﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPublicEntityPair extends IMessageBase
    {
        public var fromEntity:SEntityId;
        public var toEntity:SEntityId;
        public const _type:int = 117;
        public static var _regist:SPublicEntityPair = new SPublicEntityPair(true);

        public function SPublicEntityPair(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SPublicEntityPair();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.fromEntity.__write(param1);
            this.toEntity.__write(param1);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.fromEntity = new SEntityId();
            this.fromEntity.__read(param1);
            this.toEntity = new SEntityId();
            this.toEntity.__read(param1);
            return;
        }// end function

    }
}
